package view.component;

import java.util.Collection;

import javax.swing.JFrame;

import view.renderer.Renderer;

public class GameFrame extends JFrame{
	
	private ViewPort view;
	
	public GameFrame(){
		super();
		view = new ViewPort();
		add(view);
	}
	
	public ViewPort getViewPort(){
		return view;
	}
	
	public void display(){
		view.repaint();
	}
	
	public void registerRenderer(Renderer r){
		view.registerRenderer(r);
	}
	
	public void unregisterRenderer(Renderer r){
		view.unregisterRenderer(r);
	}
	
	public void resetRenderers(){
		view.resetRenderers();
	}
	
	public void registerAllRenderers(Collection<Renderer> c){
		view.registerAllRenderers(c);
	}

}
